<template>
  <div class="specs_wrap">
    <BreadCrumb crumb="优惠券管理"></BreadCrumb>
    <div class="top_bar">
      <AddCoupon @fnResetTable="fnGetData(1);"></AddCoupon>
    </div>
    <CouponTable
      :coupons="couponsList"
      @fnResetTable="fnGetData(1);"
    ></CouponTable>
    <el-pagination
      background
      layout="prev, pager, next"
      :page-count="pages"
      :current-page="page"
      style="text-align:center;margin-top:10px"
      @current-change="fnGetPage"
    >
    </el-pagination>
  </div>
</template>

<script>
import BreadCrumb from "@/components/widget/BreadCrumb";
import AddCoupon from "@/components/widget/AddCoupon";
import CouponTable from "@/components/widget/CouponTable";
import cons from "@/components/constant";

export default {
  name: "Coupon",
  components: {
    BreadCrumb,
    AddCoupon,
    CouponTable
  },
  data() {
    return {
      couponsList: []
    };
  },
  mounted() {
    // 获取所有的规格信息
    this.fnGetData(1);
  },
  methods: {
    
  }
};
</script>
<style scoped>
.top_bar {
  width: 95.2%;
  overflow: hidden;
  margin: 10px auto;
}
</style>
